﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace SuperMarketSystem
{
    public class MyOtherUtils
    {
		public static bool checkInt(String context)
		{//判断文本是非负整数
			String pattern = "^\\d+$";
			bool isMatch = Regex.IsMatch(context, pattern);
			return isMatch;
		}
		public static bool checkDouble(String context)
		{//判断文本是非负浮点数
			String pattern = "^\\d+(\\.\\d+)?$";
			bool isMatch = Regex.IsMatch(context, pattern);
			return isMatch;
		}
	}
}
